Option Strict On
Option Explicit On

Public Class ChartSpaceDesignerForm
    Public Property XmlData() As String
        Get
            Return COMChartSpace.XMLData()
        End Get
        Set(ByVal value As String)
            COMChartSpace.XMLData = value
        End Set
    End Property
    Public ReadOnly Property IsDirty() As Boolean
        Get
            Return COMChartSpace.IsDirty()
        End Get
    End Property

    Private Sub SaveButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SaveButton.Click
        DialogResult = Windows.Forms.DialogResult.OK
        Hide()
    End Sub

    Private Sub CancelButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CancelFormButton.Click
        DialogResult = Windows.Forms.DialogResult.Cancel
        Hide()
    End Sub
    Protected Overrides Sub OnLoad(ByVal e As System.EventArgs)
        MyBase.OnLoad(e)

        ' Set up the PivotTable for design mode
        With COMChartSpace
            '.DisplayDesignTimeUI = True
            .AllowUISelection = True
            .AllowPropertyToolbox = True
            .DisplayPropertyToolbox = True
        End With

    End Sub
End Class